<!DOCTYPE html>
<!--[if lt IE 7]>       <html class="no-js lt-ie9 lt-ie8 lt-ie7">   <![endif]-->
<!--[if IE 7]>          <html class="no-js lt-ie9 lt-ie8">          <![endif]-->
<!--[if IE 8]>          <html class="no-js lt-ie9">                 <![endif]-->
<!--[if gt IE 8]><!-->  <html class="no-js">                        <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<script type="text/javascript" src="<?php echo WWW_URL ?>js/jquery.js"></script>
        <title><?php echo h($this->pageTitle) ?></title>
        <meta name="viewport" content="width=device-width">
        <link type="text/css" rel="stylesheet" href="<?php echo BACKEND_SITE_URL ?>css/bootstrap.min.css">
        <link type="text/css" rel="stylesheet" href="<?php echo BACKEND_SITE_URL ?>css/bootstrap-responsive.min.css">
        <link type="text/css" rel="stylesheet" href="<?php echo BACKEND_SITE_URL ?>css/font-awesome.min.css">
	<link rel="stylesheet" type="text/css" href="<?php echo WWW_URL ?>js/mediaelement/mediaelementplayer.css" />
        <link type="text/css" rel="stylesheet" href="<?php echo BACKEND_SITE_URL ?>css/style.css">
	<?php /*
	  <link rel="stylesheet" type="text/css" href="<?php echo WWW_URL; ?>css/bootstrap-datetimepicker.min.css" />
	 * 
	 */ ?>
        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
        <!--[if IE 7]>
        <link type="text/css" rel="stylesheet" href="<?php echo BACKEND_SITE_URL ?>css/font-awesome-ie7.min.css"/>
        <![endif]-->

        <script src="<?php echo BACKEND_SITE_URL ?>js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
	<script type="text/javascript" src="<?php echo WWW_URL ?>js/mediaelement/mediaelement-and-player.min.js"></script>
	<script>
	    $(document).ready(function() {

		$('audio,video').mediaelementplayer({
		    success: function(player, node) {
			$('#' + node.id + '-mode').html('mode: ' + player.pluginType);
		    }
		});
	    });
	</script>
    </head>
    <body>

        <!-- BEGIN WRAP -->
        <div id="wrap">


            <!-- BEGIN TOP BAR -->

            <div id="top">
                <!-- .navbar -->
                <div class="navbar navbar-inverse navbar-static-top">
                    <div class="navbar-inner">
                        <div class="container-fluid">

                            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </a>
                            <a class="brand" href="<?php echo FRONT_SITE_URL ?>"><?php echo app()->name ?></a>

                            <!-- .topnav -->
                            <div class="btn-toolbar topnav">
				<?php /*
				  <div class="btn-group">
				  <a id="changeSidebarPos" class="btn btn-success" rel="tooltip"
				  data-original-title="Show / Hide Sidebar" data-placement="bottom">
				  <i class="icon-resize-horizontal"></i>
				  </a>
				  </div>
				  <div class="btn-group">
				  <a class="btn btn-inverse" rel="tooltip" data-original-title="E-mail" data-placement="bottom" href="<?php echo url('/contactus') ?>">
				  <i class="icon-envelope"></i>
				  <span class="label label-warning"><?php echo $this->newEmailCount ?></span>
				  </a>
				  </div>

				  <div class="btn-group">
				  <a class="btn btn-inverse" rel="tooltip" href="<?php echo url('/cms/post/create', array('post_type' => 'post')) ?>" data-original-title="New post"
				  data-placement="bottom">
				  <i class="icon-file"></i>
				  </a>
				  <a href="#helpModal" class="btn btn-inverse" rel="tooltip" data-placement="bottom"
				  data-original-title="Help" data-toggle="modal">
				  <i class="icon-question-sign"></i>
				  </a>
				  </div>
				 * 
				 */ ?>
                                <div class="btn-group">
                                    <a class="btn btn-inverse" data-placement="bottom" data-original-title="Logout" rel="tooltip" onclick='return confirm("Are you sure?")' href="<?php echo url('/site/logout') ?>"><i class="icon-off"></i></a></div>
                            </div>
                            <!-- /.topnav -->
                            <div class="nav-collapse collapse">
                                <!-- .nav -->
				<?php
//				$this->widget('bootstrap.widgets.TbMenu', array(
//				    'items' => array(
//					array('label' => 'Content Manager', 'url' => '#', 'items' => array(
//						array('label' => 'Create new post', 'url' => array('/cms/post/create', 'post_type' => 'post')),
//						array('label' => 'Create new page', 'url' => array('/cms/post/create', 'post_type' => 'page')),
//					    )),
//					array('label' => 'Gallery', 'url' => '#', 'items' => array(
//						array('label' => 'Portfolio', 'url' => array('/gallery/index', 'id' => 'portfolio')),
//						array('label' => 'Home page slider', 'url' => array('/gallery/index', 'id' => 'slider')),
//					    )),
//					array('label' => 'Newsletter', 'url' => '#', 'items' => array(
//						array('label' => 'View subscribers', 'url' => array('/newsletter/index')),
//						array('label' => 'Send newsletter', 'url' => array('/newsletter/send')),
//					    ))
//				    )
//				));
				?>
                                <!-- /.nav -->
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.navbar -->
            </div>
            <!-- END TOP BAR -->


            <!-- BEGIN HEADER.head -->
            <header class="head">
                <div class="search-bar">
                    <div class="row-fluid">
                        <div class="span12">
                            <div class="search-bar-inner">
                                <a id="menu-toggle" href="#menu" data-toggle="collapse"
                                   class="accordion-toggle btn btn-inverse visible-phone"
                                   rel="tooltip" data-placement="bottom" data-original-title="Show/Hide Menu">
                                    <i class="icon-sort"></i>
                                </a>
				<?php /*
				  <form class="main-search" action="<?php echo url('/cms/search') ?>">
				  <input class="input-block-level" type="text" placeholder="Live search..." name="keywords" />
				  <button id="searchBtn" type="submit" class="btn btn-inverse"><i class="icon-search"></i></button>
				  </form>
				 * 
				 */ ?>
                            </div>
                        </div>
                    </div>

                </div>
                <!-- ."main-bar -->
                <div class="main-bar">
                    <div class="container-fluid">
                        <div class="row-fluid">
                            <div class="span12">
				<?php if (isset($this->breadcrumbs)): ?>
    				<div id='breadcrumbs'>
					<?php
					$this->widget('bootstrap.widgets.TbBreadcrumbs', array(
					    'links' => $this->breadcrumbs,
					    'encodeLabel' => FALSE,
					));
					?>
    				</div><!-- breadcrumbs -->
				<?php endif ?>
                            </div>
                        </div>
                        <!-- /.row-fluid -->
                    </div>
                    <!-- /.container-fluid -->
                </div>
                <!-- /.main-bar -->
            </header>
            <!-- END HEADER.head -->

            <!-- BEGIN LEFT  -->
            <div id="left">
                <!-- .user-media -->
                <div class="media user-media hidden-phone">
                    <a href="" class="user-link">
                        <img src="<?php echo user()->getModel()->getAvatarUrl('small') ?>" alt="" class="media-object img-polaroid user-img" width="64" />
                    </a>

                    <div class="media-body hidden-tablet">
                        <h5 class="media-heading"><?php echo h(user()->name) ?></h5>
                        <ul class="unstyled user-info">
                            <li><a href="#">Administrator</a></li>
                            <li>Last Login : <br/>
                                <small><?php echo date('m-d-Y') ?></small>
                            </li>
                        </ul>
                    </div>
                </div>
                <!-- /.user-media -->

                <!-- BEGIN MAIN NAVIGATION -->

                <ul id="menu" class="unstyled accordion collapse in">
                    <!--
		    <li class="accordion-group <?php echo $this->activeMenu == 'dashboard' ? 'active' : ''; ?>">
                        <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#dashboard-nav">
                            <i class="icon-dashboard icon-large"></i> Dashboard <span class="label label-inverse pull-right">2</span>
                        </a>
                        <ul class="collapse" id="dashboard-nav">
                            <li><a href="<?php echo url('/dashboard/index') ?>"><i class="icon-angle-right"></i>Quick link</a></li>
                            <li><a href="<?php echo url('/dashboard/statistic') ?>"><i class="icon-angle-right"></i>Statistic</a></li>
                        </ul>
                    </li>
		    
                    <li class="accordion-group <?php echo $this->activeMenu == 'cms' ? 'active' : ''; ?>">
                        <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#cms-nav">
                            <i class="icon-tasks icon-large"></i> Content manager <span class="label label-inverse pull-right">4</span>
                        </a>
                        <ul class="collapse " id="cms-nav">
                            <li><a href="<?php echo url('/cms/post/index', array('post_type' => 'page')) ?>"><i class="icon-angle-right"></i>Page</a></li>
                            <li><a href="<?php echo url('/cms/post/index', array('post_type' => 'post')) ?>"><i class="icon-angle-right"></i>Blog</a></li>
                            <li><a href="<?php echo url('/cms/menu') ?>"><i class="icon-angle-right"></i>Menu</a></li>
                            <li><a href="<?php echo url('/emailtemplate/index') ?>"><i class="icon-angle-right"></i>Email template</a></li>
                        </ul>
                    </li>
		    
		    
                    <li <?php echo $this->activeMenu == 'calendar' ? 'class="active"' : ''; ?>><a href="<?php echo url('/cal') ?>"><i class="icon-calendar icon-large"></i> Calendar</a></li>
                    <li class="accordion-group <?php echo $this->activeMenu == 'user' ? 'active' : ''; ?>">
                        <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#user-nav">
                            <i class="icon-user icon-large"></i> User manager <span class="label label-inverse pull-right">2</span>
                        </a>
                        <ul class="collapse " id="user-nav">
                            <li><a href="<?php echo url('/user/member') ?>"><i class="icon-angle-right"></i>All Member</a></li>
                            <li><a href="<?php echo url('/user/member/create') ?>"><i class="icon-angle-right"></i>Add new</a></li>
                        </ul>
                    </li>
		    
                    <li class="accordion-group <?php echo $this->activeMenu == 'contact' ? 'active' : ''; ?>">
                        <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#contact-nav">
                            <i class="icon-envelope icon-large"></i> Contact <span class="label label-inverse pull-right">2</span>
                        </a>
                        <ul class="collapse " id="contact-nav">
                            <li><a href="<?php echo url('/contactus/index') ?>"><i class="icon-angle-right"></i>All messages</a></li>
                            <li><a href="<?php echo url('/contactus/send') ?>"><i class="icon-angle-right"></i>Send</a></li>
                        </ul>
                    </li>
                    <li class="accordion-group <?php echo $this->activeMenu == 'page' ? 'active' : ''; ?>">
                        <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#page-nav">
                            <i class="icon-cog icon-large"></i> Page / Layout <span class="label label-inverse pull-right">2</span>
                        </a>
                        <ul class="collapse " id="page-nav">
                            <li><a href="<?php echo url('/block/index') ?>"><i class="icon-angle-right"></i>Manage blocks</a></li>
                            <li><a href="<?php echo url('/page/index') ?>"><i class="icon-angle-right"></i>Manage pages</a></li>
                        </ul>
                    </li>
		    
		    
                    <li class="accordion-group <?php echo $this->activeMenu == 'gallery' ? 'active' : ''; ?>">
                        <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#gallery-nav">
                            <i class="icon-tasks icon-large"></i> Gallery manager <span class="label label-inverse pull-right">2</span>
                        </a>
                        <ul class="collapse " id="gallery-nav">
                            <li><a href="<?php echo url('/gallery/index', array('id' => 'slider')) ?>"><i class="icon-angle-right"></i>Home page slider</a></li>
                            <li><a href="<?php echo url('/gallery/index', array('id' => 'portfolio')) ?>"><i class="icon-angle-right"></i>Portfolio</a></li>
                        </ul>
                    </li>
		    -->

		    <li class="accordion-group <?php echo $this->activeMenu == 'setting' ? 'active' : ''; ?>">
                        <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#setting-nav">
                            <i class="icon-wrench icon-large"></i> Settings <span class="label label-inverse pull-right">2</span>
                        </a>
                        <ul class="collapse " id="setting-nav">
                            <li><a href="<?php echo url('/setting/index', array('type' => 'site')) ?>"><i class="icon-angle-right"></i>Site settings</a></li>
			    <li><a href="<?php echo url('/setting/index', array('type' => 'text_site')) ?>"><i class="icon-angle-right"></i>Text settings</a></li>
                            <!--
			    <li><a href="<?php echo url('/setting/index', array('type' => 'email')) ?>"><i class="icon-angle-right"></i>Email</a></li>
                            <li><a href="<?php echo url('/setting/index', array('type' => 'seo')) ?>"><i class="icon-angle-right"></i>SEO</a></li>
                            <li><a href="<?php echo url('/setting/index', array('type' => 'sem')) ?>"><i class="icon-angle-right"></i>SEM</a></li>
			    -->
                            <li><a href="<?php echo url('/setting/deleteCache') ?>"><i class="icon-angle-right"></i>Clear cache</a></li>
                        </ul>
                    </li>

		    <li class="accordion-group <?php echo $this->activeMenu == 'user' ? 'active' : ''; ?>">
                        <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#user-nav">
                            <i class="icon-user icon-large"></i> User manager <span class="label label-inverse pull-right">2</span>
                        </a>
                        <ul class="collapse " id="user-nav">
                            <li><a href="<?php echo url('/user/member') ?>"><i class="icon-angle-right"></i>All Member</a></li>
                            <li><a href="<?php echo url('/user/member/create') ?>"><i class="icon-angle-right"></i>Add new</a></li>
                        </ul>
                    </li>

		    <li class="accordion-group <?php echo Yii::app()->controller->id == 'post' ? 'active' : ''; ?>">
                        <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#post-nav">
                            <i class="icon-edit icon-large"></i> Post Manager <span class="label label-inverse pull-right">2</span>
                        </a>
                        <ul class="collapse " id="post-nav">
                            <li><a href="<?php echo url('/post') ?>"><i class="icon-angle-right"></i>All Post</a></li>                          
                            <li><a href="<?php echo url('/post/create') ?>"><i class="icon-angle-right"></i>Add New</a></li>
			    <li><a href="<?php echo url('/post/reportabuse') ?>"><i class="icon-angle-right"></i>Report abuse</a></li>
                        </ul>
                    </li>

		    <li class="accordion-group <?php echo Yii::app()->controller->id == 'filterword' ? 'active' : ''; ?>">
                        <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#filter-word-nav">
                            <i class="icon-edit icon-large"></i> Filter word Manager <span class="label label-inverse pull-right">2</span>
                        </a>
                        <ul class="collapse " id="filter-word-nav">
                            <li><a href="<?php echo url('/filterword') ?>"><i class="icon-angle-right"></i>All Word</a></li>                          
                            <li><a href="<?php echo url('/filterword/create') ?>"><i class="icon-angle-right"></i>Add New</a></li>			    
                        </ul>
                    </li>
		    <?php /*
		      <li class="accordion-group <?php echo Yii::app()->controller->id == 'category' ? 'active' : ''; ?>">
		      <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#cat-nav">
		      <i class="icon-list-alt icon-large"></i> Category Manager <span class="label label-inverse pull-right">2</span>
		      </a>
		      <ul class="collapse " id="cat-nav">
		      <li><a href="<?php echo url('/category') ?>"><i class="icon-angle-right"></i>All Category</a></li>
		      <li><a href="<?php echo url('/category/create') ?>"><i class="icon-angle-right"></i>Add New</a></li>
		      <li><a href="<?php echo url('/category/editbanner') ?>"><i class="icon-angle-right"></i>Edit Banner</a></li>
		      </ul>
		      </li>



		      <li class="accordion-group <?php echo Yii::app()->controller->id == 'background' ? 'active' : ''; ?>">
		      <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#bg-nav">
		      <i class="icon-picture icon-large"></i> Background Manager <span class="label label-inverse pull-right">2</span>
		      </a>
		      <ul class="collapse " id="bg-nav">
		      <li><a href="<?php echo url('/background/manager/type/header') ?>"><i class="icon-angle-right"></i>Background header</a></li>
		      <li><a href="<?php echo url('/background/manager/type/body') ?>"><i class="icon-angle-right"></i>Background body</a></li>
		      </ul>
		      </li>
		     * 
		     */ ?>
		    <li class="accordion-group <?php echo Yii::app()->controller->id == 'page' ? 'active' : ''; ?>">
                        <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#page-nav">
                            <i class="icon-edit icon-large"></i> Page Manager <span class="label label-inverse pull-right">2</span>
                        </a>
                        <ul class="collapse " id="page-nav">                           
                            <li><a href="<?php echo url('/page') ?>"><i class="icon-angle-right"></i>All page</a></li>
			    <li><a href="<?php echo url('/page/create') ?>"><i class="icon-angle-right"></i>Add page</a></li>
                        </ul>
                    </li>		    
		    <li class="accordion-group <?php echo $this->activeMenu == 'cms' ? 'active' : ''; ?>">
                        <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#cms-nav">
                            <i class="icon-tasks icon-large"></i> Content manager <span class="label label-inverse pull-right">1</span>
                        </a>
                        <ul class="collapse " id="cms-nav">                            
                            <li><a href="<?php echo url('/emailtemplate/index') ?>"><i class="icon-angle-right"></i>Email template</a></li>
			    <li><a href="<?php echo url('/ad/ad') ?>"><i class="icon-angle-right"></i>Ads manager</a></li>
                        </ul>
                    </li>

		    <li class="accordion-group <?php echo Yii::app()->controller->id == 'statementabuse' ? 'active' : ''; ?>">
			<a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#statement-abuse-nav">
			    <i class="icon-eye-close icon-large"></i> Statement abuse manager <span class="label label-inverse pull-right">2</span>
			</a>
			<ul class="collapse " id="statement-abuse-nav">
			    <li><a href="<?php echo url('/statementabuse/index') ?>"><i class="icon-angle-right"></i>All statement</a></li>
			    <li><a href="<?php echo url('/statementabuse/add') ?>"><i class="icon-angle-right"></i>Add statement</a></li>
			</ul>
		    </li>

                </ul>
                <!-- END MAIN NAVIGATION -->

            </div>
            <!-- END LEFT -->

            <!-- BEGIN MAIN CONTENT -->
            <div id="content">
                <!-- .outer -->
                <div class="container-fluid outer">
                    <div class="row-fluid">
                        <!-- .inner -->
                        <div class="span12 inner">
			    <?php echo $content ?>
                        </div>
                        <!-- /.inner -->
                    </div>
                    <!-- /.row-fluid -->
                </div>
                <!-- /.outer -->
            </div>
            <!-- END CONTENT -->


            <!-- #push do not remove -->
            <div id="push"></div>
            <!-- /#push -->
        </div>
        <!-- END WRAP -->

        <div class="clearfix"></div>

        <!-- BEGIN FOOTER -->
        <div id="footer">
            <p><?php echo date('Y') ?> - HT</p>
        </div>
        <!-- END FOOTER -->

        <!-- #helpModal -->
        <div id="helpModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="helpModalLabel"
             aria-hidden="true">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
                <h3 id="helpModalLabel"><i class="icon-external-link"></i> Help</h3>
            </div>
            <div class="modal-body">
                <p>
                    Beta version
                </p>
            </div>
            <div class="modal-footer">
                <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
            </div>
        </div>
        <!-- /#helpModal -->
        <script src="<?php echo BACKEND_SITE_URL ?>js/vendor/jquery-migrate-1.1.1.min.js"></script>
        <script src="<?php echo BACKEND_SITE_URL ?>js/lib/jquery.tablesorter.min.js"></script>
        <script src="<?php echo BACKEND_SITE_URL ?>js/lib/jquery.mousewheel.js"></script>
        <script src="<?php echo BACKEND_SITE_URL ?>js/sticky.min.js"></script>
        <script src="<?php echo BACKEND_SITE_URL ?>js/main.js"></script>
	<script src="<?php echo BACKEND_SITE_URL ?>js/main.js"></script>



        <script type="text/javascript">
<?php if (user()->hasFlash('success')) : ?>
    	    $.sticky("<?php echo h(user()->getFlash('success')) ?>", {autoclose: 5000, position: "top-right", type: "st-success"});
<?php endif; ?>
<?php if (user()->hasFlash('error')) : ?>
    	    $.sticky("<?php echo h(user()->getFlash('error')) ?>", {autoclose: 5000, position: "top-right", type: "st-error"});
<?php endif; ?>
<?php if (user()->hasFlash('info')) : ?>
    	    $.sticky("<?php echo h(user()->getFlash('info')) ?>", {autoclose: 5000, position: "top-right", type: "st-info"});
<?php endif; ?>
        </script>
	<script src="<?php echo WWW_URL; ?>js/bootstrap-datetimepicker.min.js"></script>	    
	<script type="text/javascript">
	    $(function() {
		$('#datetimepicker4').datetimepicker({
		    pickTime: false
		});

		$('#datetimepicker5').datetimepicker({
		    pickTime: false
		});

		$('#datetimepicker3').datetimepicker({
		    pickDate: false
		});

		$('#datetimepicker6').datetimepicker({
		    pickDate: false
		});

		$('#select-parent-cat').change(function() {
		    var icat = $(this).val();
		    window.location.assign("<?php echo BACKEND_SITE_URL ?>post/create/icat/" + icat);
		});
		$('#select-parent-edit-banner').change(function() {
		    var icat = $(this).val();
		    window.location.assign("<?php echo BACKEND_SITE_URL ?>category/editbanner/icat/" + icat);
		});
	    });
	</script>
    </body>
</html>